export const echartsOptions = (xAxisData, series) => {
    return {
        title: {
            text: "A",
        },
        tooltip: {
            trigger: "axis",
        },
        legend: {
            data: series.map(x => x.name),
        },
        grid: {
            left: "3%",
            right: "4%",
            bottom: "3%",
            containLabel: true,
        },
        xAxis: {
            type: "category",
            boundaryGap: false,
            data: xAxisData,
        },
        yAxis: {
            type: "value",
        },
        series
    }
}